<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pt_depart_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pt_depart_id" data-rule="required" data-source="pt/depart/index" class="form-control selectpage" name="row[pt_depart_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contactor')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contactor" class="form-control" name="row[contactor]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" class="form-control" name="row[phone]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Salary_mode')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-salary_mode" data-rule="required" class="form-control selectpicker" name="row[salary_mode]">
                {foreach name="salaryModeList" item="vo"}
                    <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('最早打卡时间')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:200px" data-date-default-date="2012-08-13 09:00" id="c-max_start" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm" name="row[max_start]" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('允许迟到时长')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-ignore_mins" data-rule="required" class="form-control" name="row[ignore_mins]" type="number" value="0">
        </div>
        <div class="col-xs-4 col-sm-4">分钟</div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Attendance_duration')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-attendance_duration" data-rule="required" class="form-control" name="row[attendance_duration]" type="number" value="0">
        </div>
        <div class="col-xs-4 col-sm-4">小时</div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Calc_duration')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-calc_duration" data-rule="required" class="form-control" name="row[calc_duration]" type="number" value="0">
        </div>
        <div class="col-xs-4 col-sm-4">小时</div>
    </div>

    <div class="form-group hourwork">
        <label class="control-label col-xs-12 col-sm-2">{:__('Self_salary')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-self_salary" class="form-control" step="0.01" name="row[self_salary]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/小时</div>
    </div>
    <div class="form-group hourwork">
        <label class="control-label col-xs-12 col-sm-2">{$labors[0]['name']}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-labor1_salary" class="form-control" step="0.01" name="row[labor1_salary]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/小时</div>
    </div>
    <div class="form-group hourwork">
        <label class="control-label col-xs-12 col-sm-2">{$labors[1]['name']}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-labor2_salary" class="form-control" step="0.01" name="row[labor2_salary]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/小时</div>
    </div>

    <div class="form-group daywork">
        <label class="control-label col-xs-12 col-sm-2">{:__('Self_salary')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-self_salary_day" class="form-control" step="0.01" name="row[self_salary_day]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/天</div>
    </div>
    <div class="form-group daywork">
        <label class="control-label col-xs-12 col-sm-2">{$labors[0]['name']}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-labor1_salary_day" class="form-control" step="0.01" name="row[labor1_salary_day]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/天</div>
    </div>
    <div class="form-group daywork">
        <label class="control-label col-xs-12 col-sm-2">{$labors[1]['name']}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-labor2_salary_day" class="form-control" step="0.01" name="row[labor2_salary_day]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/天</div>
    </div>

    <div class="form-group stagework">
        <label class="control-label col-xs-12 col-sm-2">{:__('Self_salary')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-self_salary_stage" data-rule="required" class="form-control" step="0.01" name="row[self_salary_stage]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/场</div>
    </div>
    <div class="form-group stagework">
        <label class="control-label col-xs-12 col-sm-2">{$labors[0]['name']}:</label>
        <div class="col-xs-12 col-sm-8">
          <table class="table fieldlist" data-template="labor1tpl" data-name="row[labor1_salary_stage]" id="first-table">
              <tr>
                  <td>{:__('起始')}</td>
                  <td>{:__('结束')}</td>
                  <td>{:__('工资（元/场）')}</td>
                  <td width="100"></td>
              </tr>
              <tr>
                  <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
              </tr>
          </table>

          <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
          <textarea name="row[labor1_salary_stage]" class="form-control hidden" cols="30" rows="5">[]</textarea>
          <script id="labor1tpl" type="text/html">
              <tr class="form-inline">
                  <td><input type="text" name="<%=name%>[<%=index%>][start]" class="form-control" size="8" value="<%=row.start%>" placeholder="起始"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][end]" class="form-control" size="8" value="<%=row.end%>" placeholder="结束"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][salary]" class="form-control" style="width:100px" value="<%=row.salary%>" placeholder="工资"/></td>
                  <td>
                      <!--下面的两个按钮务必保留-->
                      <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                      <!--<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                  </td>
              </tr>
          </script>
        </div>
    </div>
    <div class="form-group stagework">
        <label class="control-label col-xs-12 col-sm-2">{$labors[1]['name']}:</label>
        <div class="col-xs-12 col-sm-8">
          <table class="table fieldlist" data-template="labor2tpl" data-name="row[labor2_salary_stage]" id="second-table">
              <tr>
                  <td>{:__('起始')}</td>
                  <td>{:__('结束')}</td>
                  <td>{:__('工资（元/场）')}</td>
                  <td width="100"></td>
              </tr>
              <tr>
                  <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
              </tr>
          </table>

          <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
          <textarea name="row[labor2_salary_stage]" class="form-control hidden" cols="30" rows="5">[]</textarea>
          <script id="labor2tpl" type="text/html">
              <tr class="form-inline">
                  <td><input type="text" name="<%=name%>[<%=index%>][start]" class="form-control" size="8" value="<%=row.start%>" placeholder="起始"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][end]" class="form-control" size="8" value="<%=row.end%>" placeholder="结束"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][salary]" class="form-control" style="width:100px" value="<%=row.salary%>" placeholder="工资"/></td>
                  <td>
                      <!--下面的两个按钮务必保留-->
                      <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                      <!--<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                  </td>
              </tr>
          </script>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Added1_fee')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px" id="c-added1_fee" data-rule="required" class="form-control" step="0.01" name="row[added1_fee]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/天</div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Added2_fee')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px;" id="c-added2_fee" data-rule="required" class="form-control" step="0.01" name="row[added2_fee]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/天</div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_road')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-is_road" data-rule="required" class="form-control selectpicker" name="row[is_road]">
                {foreach name="roadList" item="vo"}
                    <option value="{$key}" {in name="key" value="n"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Self_sevice_fee')}:</label>
        <div class="col-xs-4 col-sm-2">
            <input style="width:100px;" id="c-self_sevice_fee" data-rule="required" class="form-control" step="0.01" name="row[self_sevice_fee]" type="number" value="0.00">
        </div>
        <div class="col-xs-4 col-sm-4">元/每月</div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
